import request from '@/utils/request'

export function typeList(mallId) {
  return request({
    url: '/type/list',
    method: 'get',
    params: { 'mallId': mallId }
  })
}

export function showTypeList(query) {
  return request({
    url: '/type/show',
    method: 'get',
    params: query
  })
}

export function saveOrUpdateType(data) {
  return request({
    url: '/type/save',
    method: 'post',
    data
  })
}

export function deleteType(typeId) {
  return request({
    url: '/type/remove',
    method: 'get',
    params: { 'typeId': typeId }
  })
}

export function updateRank(data) {
  return request({
    url: '/type/rank',
    method: 'post',
    data
  })
}
